package com.jzhao.jpre.model;

import org.springframework.dao.DataAccessException;

import com.jzhao.jpre.base.Assembler;
import com.jzhao.jpre.base.StringPublicDeal;
import com.jzhao.jpre.model.dao.ErrCodeDao;

public class TestErrCode {
	public static void main(String[] args) {
		ErrCodeDao errCodeDao = (ErrCodeDao) Assembler.getInstance("errCodeDao");
		StringPublicDeal cc = (StringPublicDeal) Assembler.getInstance("stringPublicDeal");
		ErrCode errCode = new ErrCode();
		try {
			errCode = errCodeDao.SelectByErrCode("1100");
			System.out.println("SysErrCode = " + errCode.getSysErrCode() );
			System.out.println("SysErrExpCn = " +  cc.convToGB2312(errCode.getSysErrExpCn()));
			System.out.println("SysErrExpEn = " + errCode.getSysErrExpEn());
		} catch (DataAccessException dae) {
			System.out.println("The record doesn't exist!");
		}
	}
}
